package com.Algorithm.HUAWEI.one20211020;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zjz
 * @Date: 2022/02/27/12:14
 * @Description:
 * @Target:
 */
public class 提取不重复的整数 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int yuShu = -1;
        int count = 1;
        int[] ints = new int[10];// 0-9

        while (n>0){
            yuShu = n%10;
            n/=10;
            if (ints[yuShu]==0){
                ints[yuShu] = count++;
            }
        }

        yuShu = 0;

        for (int i = 0; i < ints.length; i++) {
            if (ints[i]!=0){
                yuShu+=i*Math.pow(10,count-ints[i]-1);
            }
        }
        System.out.println(yuShu);
    }
}
